﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebAPI.Models
{



    public class BooksInitializer : System.Data.Entity.DropCreateDatabaseIfModelChanges<WebAPI.Models.BooksContext>
    {
        protected override void Seed(BooksContext context)
        {

            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Microsoft .NET Architecting Applications for the Enterprise','Dino Esposito',1500,'.NET',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Справочник по грамматике английского языка','Гузеева К. А.',3000,'Английский язык','5-94033-180-7')
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('The book of the Dragon','Ciruello',1000,'Artbook','1-4027-2811-5')
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Learning Flex 2','Alaric Cole',5000,'Flex',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Криптономикон','Нил Стивенсон',3000,'Хакерский роман','117-025013-4')
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Thud!','Terry Pratchett',5000,'Fantasy',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Programming Microsoft LINQ','Paolo Pialorsi, Marco Russo',4500,'Horror',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Framework Design Guidelines','Krzysztof Cwalina',2000,'.NET','0321545613')
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Microsoft SQL Server 2008 Internals','Kalen Delaney',2000,'SQL Server',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Microsoft SQL Server 2008 T-SQL Fundamentals','Itzik Ben-Gan',3000,'SQL Server',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Inside Microsoft SQL Server 2008: T-SQL Querying','Itzik Ben-Gan',2500,'SQL Server',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Inside Microsoft SQL Server 2008: T-SQL Programming','Itzik Ben-Gan',2000,'SQL Server',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Design Patterns Explained: A New Perspective on Object-Oriented Design','Alan Shalloway',2500,'Design Patterns',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Pro ASP.NET MVC 2 Framework','Steven Sanderson',3000,'.NET',NULL)
            //INSERT INTO [Books] ([Title],[Author],[NumberOfCopies],[Category],[ISBN])VALUES('Neverwhere','Neil Gaiman',1000,'Fantasy',NULL)


            context.Books.Add(new Book { Title = "Microsoft .NET Architecting Applications for the Enterprise", Author = "Dino Esposito" });
            context.Books.Add(new Book { Title = "Справочник по грамматике английского языка", Author = "Гузеева К. А", ISBN = "1111111111111" });
            context.Books.Add(new Book { Title = "The book of the Dragon", Author = "Ciruello", ISBN = "1-4027-2811-5" });
            context.Books.Add(new Book { Title = "Криптономикон", Author = "Нил Стивенсон", ISBN = "117-025013-4" });
            context.Books.Add(new Book { Title = "Thud!", Author = "Terry Pratchett" });
            context.Books.Add(new Book { Title = "Programming Microsoft LINQ", Author = "Paolo Pialorsi, Marco Russo" });
            context.Books.Add(new Book { Title = "Framework Design Guidelines", Author = "Krzysztof Cwalina" });
            base.Seed(context);
        }
    }
}